//
//  MineDetailViewController.m
//  半糖
//
//  Created by RenShuang on 15/9/18.
//  Copyright (c) 2015年 shuang. All rights reserved.
//

#import "MineDetailViewController.h"
#import "BaseHeader.h"

@interface MineDetailViewController ()

@end

@implementation MineDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 64)];
    titleView.backgroundColor = [UIColor redColor];
    [self.view addSubview:titleView];
    [titleView release];
    
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/3, 20, SCREEN_WIDTH/3, 44)];
    //titleLabel.backgroundColor = [UIColor greenColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.text = self.titleStr;
    //label加粗并放大
    titleLabel.font = [UIFont boldSystemFontOfSize:20.];
    [titleView addSubview:titleLabel];
    [titleLabel release];
    
    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeSystem];
    backButton.frame = CGRectMake(20, 30, 30, 25);
    [backButton setBackgroundImage:[UIImage imageNamed:@"fanhui.png"] forState:UIControlStateNormal];
    [backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    [titleView addSubview:backButton];
    
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(40, SCREEN_HEIGHT/5, SCREEN_WIDTH-80, 30)];
    imageView.image = [UIImage imageNamed:@"标签.png"];
    [self.view addSubview:imageView];
    [imageView release];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(40, SCREEN_HEIGHT/5+30, SCREEN_WIDTH-80, 50)];
    label.text = self.textStr;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:20.];
    [self.view addSubview:label];
    [label release];
    

}

- (void)back
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
